
--1.打落武器不会对"nosteal"标签/无敌状态 的玩家生效
--使用方法：直接粘贴到模组环境 

local modenv = ModManager:GetMod("workshop-2886753796")
if modenv then
    local function WS_STEAL_HK(inst, player)
        if player and player:IsValid() then
            return (player.components.health and player.components.health:IsInvincible())
            or player:HasTag("nosteal")
        end
    end
    local _DropPlayerWeapon2hm = modenv.DropPlayerWeapon2hm
    if _DropPlayerWeapon2hm then
        function modenv.DropPlayerWeapon2hm(inst, player, ...)
            return WS_STEAL_HK(inst, player) or _DropPlayerWeapon2hm(inst, player, ...)
        end
    end
end